<template>
    <div>
        <!--        后续如果想加介绍可以去数据库查-->
        <!--        <a-descriptions title="User Info">-->
        <!--            <a-descriptions-item label="UserName">Zhou Maomao</a-descriptions-item>-->
        <!--            <a-descriptions-item label="Telephone">1810000000</a-descriptions-item>-->
        <!--            <a-descriptions-item label="Live">Hangzhou, Zhejiang</a-descriptions-item>-->
        <!--            <a-descriptions-item label="Remark">empty</a-descriptions-item>-->
        <!--            <a-descriptions-item label="Address">-->
        <!--                No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China-->
        <!--            </a-descriptions-item>-->
        <!--        </a-descriptions>-->
        <a-image v-for="imageUrl in computedImageUrlArr" :key="imageUrl"
                 :preview="false"
                 :src="imageUrl"
                 height="auto"
                 width="100%"
        />
    </div>
</template>

<script lang="ts" setup>
//本组件需要的默认属性
import { SpuInfoDesc } from "@/model/ProductModel.ts";
import { computed } from "vue";

const props = defineProps<{ spuInfoDesc: SpuInfoDesc }>();

//计算商品介绍图片地址
const computedImageUrlArr = computed<String[]>(() => {
    //根据','切割获取图片地址
    return props.spuInfoDesc.decript.split(",");
});
</script>

<style lang="scss" scoped>

</style>